const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave: false,
  devServer: {
    proxy: {  
      '/api': {
        target: 'http://iwenwiki.com:3000', // 目标地址，请求的后台接口
        ws: true,
        changeOrigin: true,
        pathRewrite: { // 路径重写
          "^/api":''
        }
      },
      // https://interface.music.163.com
      '/foo': {
        target: 'https://interface.music.163.com', // 目标地址，请求的后台接口
        ws: true,
        changeOrigin: true,
        pathRewrite: { // 路径重写
          "^/foo":''
        }
      },
      // https://y.music.163.com/m/playlist?id=3136179094
      '/boo': {
        target: 'https://music.163.com',   // 目标地址，请求的后台接口
        ws: true,
        changeOrigin: true,
        pathRewrite: { // 路径重写
          "^/boo":''
        }
      },
    }
  }
})

